﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


using KingRoad.EPM.PersonnelLogEntity.Model;
using Unis.Framework.Core.Utility;
using KingRoad.EPM.PersonnelLogDAL.ProjectSupervisingService;


namespace KingRoad.EPM.PersonnelLogBLL.UIRules
{
    /// <summary> 
    /// 客户端业务处理类。 
    /// 文件生成时间 2017/1/12 13:59:05
    /// </summary> 
    public class ProjectSupervisingUIRule
    {
        private readonly IProjectSupervisingService _projectSupervisingService;
        
        
        public ProjectSupervisingUIRule(){}
        
        /// <summary> 
        /// construct function... 
        /// </summary> 
        public ProjectSupervisingUIRule(IProjectSupervisingService  projectSupervisingService)
        {
           _projectSupervisingService=projectSupervisingService;
        }
        /// <summary>
        /// 获取驻地办信息
        /// </summary>
        /// <returns></returns>
        public List<ProjectSupervisingInfo> GetAllSupersingInfo()
        {
            var list = _projectSupervisingService.GetEntityList();
            return list;
        }

        /// <summary>
        /// 根据条件查询List信息(分页)
        /// </summary>
        /// <param name="numCurrentPage">当前页</param>
        /// <param name="numPerPage">每页数据大小</param>
        /// <param name="orderByField">排序字段名称</param>
        /// <param name="totalRecord">总数据量</param>
        /// <param name="sqlCondition">sql查询条件</param>
        /// <returns></returns>
        public List<ProjectSupervisingInfo> GetListForPage(int numCurrentPage, int numPerPage,
                                                                        string orderByField, out int totalRecord, string sqlCondition, string desc = "desc")
        {
            var list = _projectSupervisingService.GetEntityListByContionRe(numCurrentPage, numPerPage, orderByField, out totalRecord, sqlCondition, desc);
            return list;
        }
    }
}
